﻿using RpcClient.Interface;
using RpcModel;
using RpcSync.Collect;

namespace RpcSync.Service.Event
{
    internal class IdgeneratorEvent : IRpcApiService
    {
        private IIdgeneratorCollect _Idgenerator;

        public IdgeneratorEvent(IIdgeneratorCollect idgenerator)
        {
            this._Idgenerator = idgenerator;
        }

        public int GetIdgeneratorWorkId(MsgSource source)
        {
            return this._Idgenerator.GetWorkId(source.ServerId,source.SystemTypeId);
        }
    }
}
